package guoanmaker.provider.business.model;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;

import guoanmaker.provider.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/*
 * 2017-12-15 zhouyu
 * 金融项目实体
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="t_personal_finance_project")
public class PersonalFinanceProject extends IdEntity{
	
	private String name;//项目名称
	private String projectPhoto;//项目图片
	private String stage;//项目所处阶段
	private String summary;//项目概述
	private String concreteSummary;//项目具体概述
	private String prospectus;//项目规划书（路径）
	private String prospectusName;//项目规划书名称
	
	//基本信息
	private BigDecimal financingTarget;//项目融资目标
	private String sellShares;//出让股份
	private BigDecimal financingValuation;//融资估值
	private String roundOfFinancing;//融资轮次
	private String useOfFunds;//资金用途
	private String investmentExitMode;//投资退出方式
	
	//行业信息
	private String industryField;//行业领域
	private String competitiveAdvantageInTheField;//领域竞争优势
	private Integer industryRankings;//行业排名
	private BigDecimal marketShare;//市场占有率
	
	//团队信息
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
	@JoinColumn(name = "finance_project_id")
	private List<PersonalFinanceProjectPartner> personalFinanceProjectPartnerList;//创始人和合伙人信息
	
	//项目信息
	private BigDecimal lastRoundOfValuations;//上一轮估值
	
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
	@JoinColumn(name = "finance_project_id")
	private List<PersonalFppatentTechnology> personalFppatentTechnologyList;//专利技术
	
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
	@JoinColumn(name = "finance_project_id")
	private List<PersonalFinancingExperience> personalFinancingExperienceList;//融资经历
	
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
	@JoinColumn(name = "finance_project_id")
	private List<PersonalBusinessEventAwards> personalBusinessEventAwardsList;//创业赛事奖项
	
	//财务数据
	private BigDecimal nperatingIncomeOfTheLastYear;//上年度营业收入
	private BigDecimal netProfitForThePreviousYear;//上年净利润
	private BigDecimal businessIncomeOfLastMonthAndMonth;//上月月营业收入
	private BigDecimal monthlyNetProfit;//月净利润
	private BigDecimal growthRateOfBusinessIncomeLastMarch;//近三月营业收入增长率
	private BigDecimal netProfitGrowthRateInRecentMarch;//近三月净利润增长率
	private BigDecimal grossProfitRate;//毛利率
	private BigDecimal netInterestRate;//净利率
	private Integer registeredUsers;//注册用户量
	private Integer whetherToStartProfit;//是否开始盈利
	private Integer whetherTheProductIsOnlineOrNot;//产品是否上线
	private Integer numberSserviceEnterprises;//服务企业数量
	private BigDecimal customerCost;//获客成本
	private Integer dailyLiving;//日活
	private Integer dailyBrowsing;//日浏览量
	private BigDecimal repurchaseRate;//复购率
	
	
	private String financeProjectNumber;//项目编号(PJ+七位顺序号.只有审核通过后，才会有编号)
	@Temporal(TemporalType.TIMESTAMP)
	private Date firstSubmitTime;//首次提交时间
	@Temporal(TemporalType.TIMESTAMP)
	private Date updateTime;//更新时间
	@Temporal(TemporalType.TIMESTAMP)
	private Date toExamineTime;//审核通过时间
	private Integer ifRequired;//必填是否全部填写完毕（0必填项没有填完    1必填项均已填完）
	private Integer status;//该项目的审核状态（0:已通过   1:已下线   2:已拒绝   3:待发布   4:待审核）
	private Integer importantLevel;//该项目的重要级别(由运营人员设置   1:hot 2:warm 3:cool 4:cold 5:空)
	
	@Column(name="user_id")
	private String personalUserId;//发布该消息的用户id
	
}
